import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('/@/views/home.vue') // 路由懒加载，优化访问性能
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('/@/views/login.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),// hash 模式: createWebHashHistory,history 模式: createWebHistory
  routes
})

export default router
